

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit GeozoneCircle</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">GeozoneCircle List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New GeozoneCircle</g:link></span>
        </div>
        <div class="body">
            <h1>Edit GeozoneCircle</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${geozoneCircle}">
            <div class="errors">
                <g:renderErrors bean="${geozoneCircle}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${geozoneCircle?.id}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="geozoneNotifyType">Geozone Notify Type:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'geozoneNotifyType','errors')}">
                                    <g:select id="geozoneNotifyType" name="geozoneNotifyType" from="${geozoneCircle.constraints.geozoneNotifyType.inList.collect{it.encodeAsHTML()}}" value="${fieldValue(bean:geozoneCircle,field:'geozoneNotifyType')}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="description">Description:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'description','errors')}">
                                    <input type="text" id="description" name="description" value="${fieldValue(bean:geozoneCircle,field:'description')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="zoneType">Zone Type:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'zoneType','errors')}">
                                    <g:select id="zoneType" name="zoneType" from="${geozoneCircle.constraints.zoneType.inList.collect{it.encodeAsHTML()}}" value="${fieldValue(bean:geozoneCircle,field:'zoneType')}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="points">Points:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'points','errors')}">
                                    
<ul>
<g:each var="p" in="${geozoneCircle?.points?}">
    <li><g:link controller="point" action="show" id="${p.id}">${p}</g:link></li>
</g:each>
</ul>
<g:link controller="point" params="["geozoneCircle.id":geozoneCircle?.id]" action="create">Add Point</g:link>

                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="city">City:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'city','errors')}">
                                    <input type="text" id="city" name="city" value="${fieldValue(bean:geozoneCircle,field:'city')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="country">Country:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'country','errors')}">
                                    <input type="text" id="country" name="country" value="${fieldValue(bean:geozoneCircle,field:'country')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="dateCreated">Date Created:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'dateCreated','errors')}">
                                    <g:datePicker name="dateCreated" value="${geozoneCircle?.dateCreated}" ></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="devicegroup">Devicegroup:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'devicegroup','errors')}">
                                    <g:select optionKey="id" from="${Devicegroup.list()}" name="devicegroup.id" value="${geozoneCircle?.devicegroup?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="lastUpdated">Last Updated:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'lastUpdated','errors')}">
                                    <g:datePicker name="lastUpdated" value="${geozoneCircle?.lastUpdated}" ></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="postalCode">Postal Code:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'postalCode','errors')}">
                                    <input type="text" id="postalCode" name="postalCode" value="${fieldValue(bean:geozoneCircle,field:'postalCode')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="radius">Radius:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'radius','errors')}">
                                    <input type="text" id="radius" name="radius" value="${fieldValue(bean:geozoneCircle,field:'radius')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="stateProvince">State Province:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'stateProvince','errors')}">
                                    <input type="text" id="stateProvince" name="stateProvince" value="${fieldValue(bean:geozoneCircle,field:'stateProvince')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="streetAddress">Street Address:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:geozoneCircle,field:'streetAddress','errors')}">
                                    <input type="text" id="streetAddress" name="streetAddress" value="${fieldValue(bean:geozoneCircle,field:'streetAddress')}"/>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
